Rount() method in JavaScript